<?php $this->headTitle($this->title); ?>
<h2><?php echo $this->escape($this->title); ?></h2>
<p><a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'add'));?>">Add new user</a></p>
<table id="userTable" class="tablesorter">
<thead>
	<tr>
		<th>Username</th>
		<th>Email Address</th>
		<th>Role</th>
		<th>Name</th>
		<th>&nbsp;</th>
	</tr>
</thead>
<tbody>
<?php foreach($this->users as $user) : ?>
	<tr>
		<td><?php echo $this->escape($user->username);?></td>
		<td><?php echo $this->escape($user->email_address);?></td>
		<td><?php echo $this->escape($user->role);?></td>
		<td><?php echo $this->escape($user->first_name . ' ' . $user->last_name);?></td>
		<td>
		<a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'edit', 'id'=>$user->id));?>">Edit</a>
		<a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'delete', 'id'=>$user->id));?>">Delete</a>
		</td>
	</tr>
<?php endforeach; ?>
</tbody>
</table>